import path from "path";

/**
 * 上线阶段的环境配置
 */
export const prod = {
  port: 80,
  host: "127.0.0.1",
  apiurl: '/bmy/api',
  uploadPath: '../resources/static/upload/',
  initPlugins: {
    SessionKey: '4WM7mSy5S5kkxcE1I3',
    staticPath: '../resources/static',
    viewsPath: '../resources/view'
  },
  logs: {
    outType: "dateFile",
    path: "logs",
    accessFilename: "access.log",
    applicationFilename: "application.log"
  },
  banner: {
    welcome: () => {
      return `
        👏  基于 Node.js + Koa2 + TypeScript + SpringCloud 微服务 开发的在线学习网站 👏

        👉  1：PC官网: http://${prod.host}:${prod.port}/
        👉  2：Admin后台: http://${prod.host}:${prod.port}/course/all
        👉  3：项目地址: https://gitee.com/bmycode/official_website
            `
    }
  },
  qiniu: {
    accessKey: '0MGmT_rkMiaOeXY09B4EhBnXuDcIYyKlGumQ-zUt',
    secretKey: '59dfmEi9Q50rMlz9sxTBCvYDhM7biERAjflBXALb',
    HLSconfig: {
      VideoBaseUrl: 'http://video.geekhelp.cn/',
      FromBucket: 'guaikevideo',
      ToBucket: 'm3u8video',
      VideoHlsParams: 'avthumb/m3u8/segtime/10/ab/128k/ar/44100/acodec/libfaac/r/30/vb/640k/vcodec/libx264/stripmeta/0/noDomain/1|saveas/'
    }
  },
  bmob: {
    ApplicationId: '2817f9bc51901098c4aa121089db22aa',
    RestApiKey: '8a40b98b199bda5b7f1e17f1756c576f',
    MasterKey: '68d2935e799d58d17cc194c94d00406c'
  },
  alipay: {
    appId: '2019070365762545',
    notifyUrl: 'http://www.geekhelp.cn/bmy/api/notify/updateOrder',
    returnUrl: 'http://www.geekhelp.cn/payment',
    subject: '怪客课堂的课程购买',
    keyPath: {
      publicKey: '../config/public-key.pem',
      privateKey: '../config/private-key.pem'
    }
  },
  title: ' | 怪客课堂',
  typeorm: {
    type: 'mysql',
    host: "localhost",
    charset: "utf8_general_ci",
    port: 3306,
    username: "root",
    password: "lb714500",
    database: "onlineStudy",
    logging: "error",
    logger: "file",
    maxQueryExecutionTime: 1000,
    entities: [
      `${path.join(__dirname,'../entity/*{.js,.ts}')}`
    ]
  }
};